<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title>评论页面</title>
<link rel="stylesheet" href="${path }/assets/css/bootstrap.min.css">
<link rel="stylesheet" href="${path }/assets/css/ie7.css">
<link rel="stylesheet" href="${path }/assets/css/style.css">
<link rel="stylesheet" href="${path }/assets/css/font-awesome.min.css">
<link rel="stylesheet" href="${path }/css/main.css" />
<link rel="stylesheet" type="text/css"
	href="${path }/css/sinaFaceAndEffec.css" />

</head>

<body style="background: url(assets/img/bg/1.jpg);">
	<header class="header-area header-sticky">
		<div class="header-container">
			<div class="row">
				<div class="col-lg-5 display-none-md display-none-xs">
					<div class="ht-main-menu">
						<nav>
							<ul>
								<li><a href="productIndex">首页</a></li>
								<li><a href="productlist">水果展览</a></li>
								<li><a href="fruit.jsp">水果文化</a>
								</li>
								<li class="active"><a href="commentlist">精选评论</a></li>
								<li><a href="shopping.jsp">购物车</a></li>
								<li><a href="personalServlet">个人信息</a></li>
							</ul>
						</nav>
					</div>
				</div>

				<div class="col-lg-5 col-sm-8">
					<div class="header-content d-flex justify-content-end">
						<div class="search" style="background: url(assets/img/bg/11.jpg);">
							<div class="search_form">
								<form action="${path }/Search" method="get">
									<input type="text" name="searchWord" placeholder="&nbsp;&nbsp;&nbsp;你要搜寻的商品..."  style="background:url(assets/img/bg/11.jpg);width: 150px;height:34px; border: 1px solid #aaa;">
									<input type="submit" value="搜索" style="background:url(assets/img/bg/11.jpg);width: 50px;height: 34px;text-align: center;
									">
								</form>
							</div>
						</div>

						<div class="settings-wrapper">
							<a style="width: 90px; font-size: 12px;">欢迎您,<i>${username.username }</i></a>
						</div>

						<div class="settings-wrapper">
							<a href="login.jsp">
								<input style="position: absolute; border: none;width: 70px;height: 40px;font-size: 12px;color: orangered; background: url(assets/img/bg/11.jpg);" type="submit" name="" value="点击退出" />
							</a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</header>


	<div id="content"
		style="width: 700px; height: 0 auto; margin-left: 320px; margin-top: 40px; position: relative; top: 100px;">
		<div class="wrap">
			<div class="comment">
				<form action="${path }/commentAdd" method="get">
					<div class="head-face">
						<img src="images/1.jpg" />
						<p>派大星</p>
					</div>

					<div class="content">
						<div class="cont-box">
							<input class="text" name="comment" placeholder="输入评价..."
								style="background: url(assets/img/bg/10.jpg);">
						</div>
						</br>
						<div class="tools-box">
							<div class="tools-box">
								<div class="operator-box-btn">
									<input class="text" name="username" placeholder="您当前要提交的昵称:${username.username}" style="height:30px;width: 172px; font-size: 12px;background: url(assets/img/bg/10.jpg);">
								 </div>
								 </br>
								<div class="submit-btn">
									<input type="submit"  value="提交评论" style="height:30px;width: 80px;color:#aaa; "/>
								</div>
							</div>
						</div>
					</div>
				</form>
			</div>



			<c:forEach items="${comments}" var="p">
				<div id="info-show">

					<ul>
						<li>
							<div class="head-face">
								<img src="images/1.jpg">
							</div>

							<div class="reply-cont">
								<a href="comment?id=${p.id }"> </a>
								<p class="username">${p.username }</p>
								<p class="comment-body">${p.comment }</p>
								<p class="comment-footer">${p.time }</p>
							</div>
						</li>
					</ul>

				</div>
			</c:forEach>
		</div>
	</div>
	<script type="text/javascript">
								var msg = '${msg}'
					
								if (msg != null && msg != '') {
									alert(msg);
								} else {
								
								}
		</script>
	<script src="${path }/assets/js/vendor/jquery-3.2.1.min.js"></script>
	<script src="${path }/assets/js/bootstrap.min.js"></script>
	<script src="${path }/assets/js/main.js"></script>
	<script type="text/javascript" src="${path }/js/main.js"></script>
	<script type="text/javascript" src="${path }/js/sinaFaceAndEffec.js"></script>


</body>

</html>